/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uc.edu.server;

/**
 * This defines what methods the message "backing store"
 * has to expose.
 * @author tony
 */
public interface IMessageStore
{
    /**
     * What's the first message with an id
     * greater than the passed parameter?
     * @param lastID
     * @return MessageWithID
     */
    MessageWithID nextMessage(long lastID);
    
    /**
     * Accessor
     * @return 
     */
    long getMaxID();
    /**
     * Mutator
     * @param newMax 
     */
    void setMaxID(long newMax);
            
    
    /**
     * Adds a message to the store. Assigns
     * an id to the MessageWithID and returns
     * the id.
     */
    long addMessage(MessageWithID msg);
}
